using System.Collections.Generic;
using UnityEngine;

public class AllVehicleStealEvents : MonoBehaviour
{
	public static AllVehicleStealEvents instance;

	public VehicleStealEvent stealVehicle;

	public TimedVehicleStealEvent steal5Vehicles;

	private void Awake()
	{
		instance = this;
	}

	public void CheckAllEvents(VehicleStealInfo newVehicleSteal, List<VehicleStealInfo> vehicleStealList)
	{
		if (stealVehicle.IfEvent(newVehicleSteal))
		{
			GameplayRewardManager.instance.AddToRewardQueue(stealVehicle);
		}
		if (steal5Vehicles.IfEvent(newVehicleSteal, vehicleStealList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(steal5Vehicles);
			StartCoroutine(steal5Vehicles.DisableForTime());
		}
		GameplayRewardManager.instance.TryShowMessage();
	}
}
